// 引进提示
import {errdata} from './errdata.js'

let baseUrl = 'https://meituan.thexxdd.cn/api'

const request = function(option) {
	return new Promise((resolve, reject) => {
		uni.request({
			url: baseUrl + option.url,
			method: option.method || 'get',
			data: option.data || {},
			success: resolve,
			fail: function(err) {
				errdata.errlist('获取数据失败')
				reject(res)
			}
		})
	})
}

export default request


// // 登录
// let wxloginurl = `${url}wxuser/wxlogin`

// // 微信支付
// let wxpayingurl = `${url}wxpay/wxpaying`

// // 提交评论
// let commenturl = `${url}message/comment`


